home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 11.4 KB | 371 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWMAObjs.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWMAOBJS_H
- #define FWMAOBJS_H
-
- #ifndef FWVIEW_H
- #include "FWView.h"
- #endif
-
- #ifndef FWCONTRL_H
- #include "FWContrl.h"
- #endif
-
- #ifndef FWBUTTON_H
- #include "FWButton.h"
- #endif
-
- #ifndef FWMAREAD_H
- #include "FWMARead.h"
- #endif
-
- //========================================================================================
- // MacApp types
- //========================================================================================
- struct VPoint
- {
- long v;
- long h;
- };
- struct VRect
- {
- long top;
- long left;
- long bottom;
- long right;
- };
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- class FW_CReadableStream;
- class FW_CSuperView;
- class FW_CScrollBarScroller;
- class FW_MReceiver;
- struct Environment;
-
- //========================================================================================
- // class FW_CMAObject
- //========================================================================================
-
- class FW_CMAObject
- {
- public:
- FW_CMAObject(ResType type);
-
- virtual void ReadFrom(Environment* ev, FW_CReadableStream& stream,
- FW_CSuperView* superview, FW_MReceiver* receiver);
- public:
- ResType fClassID;
- long fEndOfObject;
- };
-
- //========================================================================================
- // class FW_CMABehavior
- //========================================================================================
-
- class FW_CMABehavior : public FW_CMAObject
- {
- public:
- FW_CMABehavior(ResType type);
-
- virtual void ReadFrom(Environment* ev, FW_CReadableStream& stream,
- FW_CSuperView* superview, FW_MReceiver* receiver);
-
- };
-
- //========================================================================================
- // class FW_CMADialogBehavior
- //========================================================================================
-
- class FW_CMADialogBehavior : public FW_CMABehavior
- {
- public:
- FW_CMADialogBehavior(ResType type);
-
- virtual void ReadFrom(Environment* ev, FW_CReadableStream& stream,
- FW_CSuperView* superview, FW_MReceiver* receiver);
- static FW_CMAObject* Create(ResType type);
- };
-
- //========================================================================================
- // class FW_CMAEventHandler
- //========================================================================================
-
- class FW_CMAEventHandler : public FW_CMAObject
- {
- public:
- FW_CMAEventHandler(ResType type);
-
- virtual void ReadFrom(Environment* ev, FW_CReadableStream& stream,
- FW_CSuperView* superview, FW_MReceiver* receiver);
-
- ResType fIdentifier; // view id
- Boolean fEnabled; // not used by ODF for now
- };
-
- //========================================================================================
- // class FW_CMAView
- //========================================================================================
-
- class FW_CMAView : public FW_CMAEventHandler
- {
- public:
- FW_CMAView(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual void ReadFrom(Environment* ev, FW_CReadableStream& stream,
- FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
-
- void PostCreateODFView(Environment* ev, FW_CSuperView* superview);
-
- FW_CRect fBounds;
- FW_CPoint fExtent;
- Boolean fIsContentView;
- // FW_ViewBinding fBindings; SEE LATER
- Boolean fVisible;
- Boolean fWantsToBeTarget;
- Boolean fIsScroller;
- };
-
- //========================================================================================
- // class FW_CMAWindow
- //========================================================================================
-
- class FW_CMAWindow : public FW_CMAView
- {
- public:
- FW_CMAWindow(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
-
- short fProcID;
- };
-
- //========================================================================================
- // class FW_CMADialog
- //========================================================================================
-
- class FW_CMADialog : public FW_CMAView
- {
- public:
- FW_CMADialog(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- };
-
- //========================================================================================
- // class FW_CMATextGridView
- //========================================================================================
- // TTextListView is the only "grid view" class supported by ODF for now.
- // Later we can add a FW_CMAGridView from which FW_CMATextGridView will derive
-
- class FW_CMATextGridView : public FW_CMAView
- {
- public:
- FW_CMATextGridView(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- short fNumOfRows;
- Boolean fSingleSelection;
- short fTextStyleID;
- };
-
- //========================================================================================
- // class FW_CMAControl
- //========================================================================================
-
- class FW_CMAControl : public FW_CMAView
- {
- public:
- FW_CMAControl(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- short fTextStyleID;
- long fEventNumber; // MacApp event number or "choices"
- // is used as the ODF control message
- };
-
- //========================================================================================
- // class FW_CMAStaticText
- //========================================================================================
-
- class FW_CMAStaticText : public FW_CMAControl
- {
- public:
- FW_CMAStaticText(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- Str255 fText;
- Boolean fAutoWrap;
- };
-
- //========================================================================================
- // class FW_CMAEditText
- //========================================================================================
-
- class FW_CMAEditText : public FW_CMAStaticText
- {
- public:
- FW_CMAEditText(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- short fMaxChars;
- };
-
- //========================================================================================
- // class FW_CMATEView
- //========================================================================================
-
- class FW_CMATEView : public FW_CMAView
- {
- public:
- FW_CMATEView(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- Boolean fAutoWrap;
- short fMaxChars;
- short fTextStyleID;
- };
-
- //========================================================================================
- // class FW_CMACluster
- //========================================================================================
-
- class FW_CMACluster : public FW_CMAControl
- {
- public:
- FW_CMACluster(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- Str255 fLabel;
- };
-
- //========================================================================================
- // class FW_CMAButton
- //========================================================================================
-
- class FW_CMAButton : public FW_CMAControl
- {
- public:
- FW_CMAButton(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- FW_ButtonKind fKind;
- Str255 fLabel;
- Boolean fIsOn;
- };
-
- //========================================================================================
- // class FW_CMAPopupMenu
- //========================================================================================
-
- class FW_CMAPopupMenu : public FW_CMAControl
- {
- public:
- FW_CMAPopupMenu(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- short fMenuID;
- short fCurrentItem;
- short fLabelWidth;
- Str255 fLabel;
- Boolean fUseAddResMenu;
- ResType fUseAddResMenuResType;
- };
-
- //========================================================================================
- // class FW_CMAScrollBarScroller
- //========================================================================================
-
- class FW_CMAScrollBarScroller : public FW_CMAView
- {
- public:
- FW_CMAScrollBarScroller(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- ResType fVertSbID;
- ResType fHorzSbID;
- VRect fSBarOffsets;
- Boolean fLiveScrolling;
-
- FW_CScrollBarScroller* fODFScroller;
-
- };
-
- //========================================================================================
- // class FW_CMAPictSView
- //========================================================================================
-
- class FW_CMAPictSView : public FW_CMAControl
- {
- public:
- FW_CMAPictSView(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- virtual void ReadFields(Environment* ev, FW_CReadableStream& stream);
-
- short fPictID;
- };
-
- //========================================================================================
- // class FW_CMAUnknownView
- //========================================================================================
-
- class FW_CMAUnknownView : public FW_CMAView
- {
- public:
- FW_DECLARE_AUTO(FW_CMAUnknownView)
-
- FW_CMAUnknownView(ResType type, FW_CString& name);
-
- static FW_CMAObject* Create(ResType type, FW_CString& name);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
-
- FW_CString fName;
- };
-
- #endif
-